﻿using System;
using SharpSqlAnalyzer.nodes;

namespace SharpSqlAnalyzer.stmt.mysql
{
	// Token: 0x0200015B RID: 347
	public class TMySQLReturn : TCustomMySQLStmt
	{
		// Token: 0x06000BC2 RID: 3010 RVA: 0x0030691C File Offset: 0x00304B1C
		public TMySQLReturn(EDbVendor dbvendor) : base(dbvendor)
		{
			this.sqlstatementtype = ESqlStatementType.sstmysqlreturn;
		}

		// Token: 0x06000BC3 RID: 3011 RVA: 0x00306930 File Offset: 0x00304B30
		internal override void buildsql()
		{
		}

		// Token: 0x06000BC4 RID: 3012 RVA: 0x00306932 File Offset: 0x00304B32
		internal override void clear()
		{
		}

		// Token: 0x06000BC5 RID: 3013 RVA: 0x00306934 File Offset: 0x00304B34
		internal override string getasprettytext()
		{
			return "";
		}

		// Token: 0x06000BC6 RID: 3014 RVA: 0x0030693B File Offset: 0x00304B3B
		internal override void iterate(TVisitorAbs pvisitor)
		{
		}

		// Token: 0x06000BC7 RID: 3015 RVA: 0x00306940 File Offset: 0x00304B40
		public override int doParseStatement(TCustomSqlStatement psql)
		{
			if (this.rootNode == null)
			{
				return -1;
			}
			TReturnSqlNode treturnSqlNode = (TReturnSqlNode)this.rootNode;
			base.doParseStatement(psql);
			if (treturnSqlNode.Expr != null)
			{
				this.returnExpr = treturnSqlNode.Expr;
			}
			return 0;
		}

		// Token: 0x17000227 RID: 551
		// (get) Token: 0x06000BC8 RID: 3016 RVA: 0x00306980 File Offset: 0x00304B80
		// (set) Token: 0x06000BC9 RID: 3017 RVA: 0x00306988 File Offset: 0x00304B88
		public virtual TExpression ReturnExpr
		{
			get
			{
				return this.returnExpr;
			}
			set
			{
				this.returnExpr = value;
			}
		}

		// Token: 0x06000BCA RID: 3018 RVA: 0x00306991 File Offset: 0x00304B91
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x06000BCB RID: 3019 RVA: 0x003069A1 File Offset: 0x00304BA1
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			if (this.returnExpr != null)
			{
				this.returnExpr.accept(v);
			}
			v.postVisit(this);
		}

		// Token: 0x040012C2 RID: 4802
		private TExpression returnExpr;
	}
}
